import { defineStore } from "pinia";

export const useCountStore = defineStore('count', {
    //方法
    actions: {
        increase(value: number) {
            this.sum += value
        }
    },
    //正真存放数据的地方
    state() {
        return {
            sum: 0
        }
    },
    getters: {
        bigSum(): number {
            return this.sum * 10
        }
    }
})